//
//  CommendClubCell.m
//  Shengzhuli
//
//  Created by FXGuo on 2018/1/9.
//  Copyright © 2018年 kamangkeji. All rights reserved.
//

#import "CommendClubCell.h"
#import <UIImageView+WebCache.h>

@interface CommendClubCell()
@property (weak, nonatomic) IBOutlet UILabel *nameOneLab;
@property (weak, nonatomic) IBOutlet UILabel *nameTwoLab;
@property (weak, nonatomic) IBOutlet UIImageView *oneImgView;
@property (weak, nonatomic) IBOutlet UIImageView *twoImgView;
@property (weak, nonatomic) IBOutlet UIButton *tuoBtn;

@end

@implementation CommendClubCell

- (void)awakeFromNib {
    [super awakeFromNib];
    if (ScreenH == 568.00) {//5s机型适配
        self.nameOneLab.font = Font(12);
        self.nameTwoLab.font = Font(12);
    }
}

- (void)setOneModel:(ClubModel *)oneModel
{
    _oneModel = oneModel;
    self.nameOneLab.text = oneModel.clubName;
    [self.oneImgView sd_setImageWithURL:[NSURL URLWithString:oneModel.clubLogo] placeholderImage:GetImage(@"default_large_goods_image")];
}
- (void)setTwoModel:(ClubModel *)twoModel
{
    _twoModel = twoModel;
    self.twoImgView.hidden = NO;
    self.tuoBtn.hidden = NO;
    self.nameTwoLab.hidden = NO;
    self.nameTwoLab.text = twoModel.clubName;
    [self.twoImgView sd_setImageWithURL:[NSURL URLWithString:twoModel.clubLogo] placeholderImage:GetImage(@"default_large_goods_image")];
}

- (IBAction)allClubClik:(UIButton *)btn
{
    if (self.allClubShowBlock) {
        self.allClubShowBlock();
    }
}
- (IBAction)btnClick:(UIButton *)btn
{
    if (self.clubClickBlock) {
        btn.tag == 0?self.clubClickBlock(self.oneModel):self.clubClickBlock(self.twoModel);
    }
}


@end
